<?php e($javascript->link('ckeditor/ckeditor')); ?>
<div class='posts form'>
<!-- Post Add Form -->
<?php e($form->create('Post')); ?>
    <fieldset>
        <legend><?php __('Add Post');?></legend>
        <!-- Post Add form left column -->
        <div class="widfats">
            <?php e($form->input('title', array('label'=>__('Post Title', true), 'class' => 'text input large', 'autocomplete'=>'off'))); ?>
            <?php e($form->input('content', array('label'=>__('Post Content', true), 'type'=>'textarea', 'class' => 'textarea', 'title'=>'公告内容'))); ?>
        </div>
        <!-- Post add sidebar -->
        <div class="sidebar">
            <!-- Save Post button -->
            <div class="widget">
                <div class="toggle">&nbsp;</div>
                <h3 class="handle"><span><?php __('Add Post');?></span></h3>
                <div class="content">
                    <?php e($form->submit(__('Add Post', true), array('class' =>'submit attention'))); ?>
                </div>
            </div>
            <!-- Post Term Selection -->
            <div class="widget">
                <div class="toggle">&nbsp;</div>
                <h3 class="handle"><?php __('Post Term');?></h3>
                <div class="content">
                    <?php e($form->input('post_term_id', array('label'=>__('Post To Term', true), 'class'=>'select', 'empty' => __('-Post Term-', true)))); ?><br class="clear"/>
                    <p>
                        <?php __('What is PostTerm?'); ?>
                        <a href="javascript:void(0)" id="DescribePostTerm"><?php __('View Help'); ?></a>
                    </p>
                    <p id="DescribePostTermPara" class="faq">公告栏目是根据公告内容来确定的, 比如说"就业指导"栏目下面的公告都是讲解相关就业的, 如宣讲会通知, 招聘会通知等.</p>
                    <p>
                        <?php __('No suitable PostTerm?'); ?>
                        <?php e($html->link(__('Add PostTerm', true), array('controller'=>'post_terms', 'action'=>'add'))); ?>
                    </p>
                </div>
            </div>
            <!-- Post Attachment Intro -->
            <div class="widget">
                <div class="toggle">&nbsp;</div>
                <h3 class="handle"><span><?php __('Post Attachments');?></span></h3>
                <div class="content">
                    <p class="faq">如果该公告需要附件, 请先保存公告, 然后会出现添加附件的选项, 按照提示添加即可.</p>
                </div>
            </div>
        </div>
    </fieldset>
<?php e($form->end()); ?>
</div>

<script type='text/javascript'>
$(window).ready(function(){
    // Create an CKEditor
    $.sme.cbk.initCKEditor('PostContent');
    // Bind PostTermDescribe toggle
    $('a#DescribePostTerm').click(function(){
        $('p#DescribePostTermPara').toggle();
    }).click();
});
</script>